/**
* 工程名: 	Quickdisk
* 文件名: 	ExitAction.java
* 创建人:  	guo.tianxiang
* 创建时间: 	2014-5-11 上午11:50:31
* 版权所有：Guo Tianxiang
* 文件描述: 描述该文件的作用
* -----------------------------变更记录 ----------------------------- 
* 日期        		变更人      		版本号  		变更描述  
* ------------------------------------------------------------------  
* 2014-5-11     guo.tianxiang   	1.0       	first created  
*/
package com.tianxiang.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

/**
 * 用户或管理员退出Action
 * @since 1.0
 * @version 1.0 2014-5-11
 * @author guo.tianxiang
 */
public class ExitAction extends ActionSupport {

	private static final long serialVersionUID = 1L;
	/**
	* @return
	* @throws Exception
	* @see com.opensymphony.xwork2.ActionSupport#execute()
	*/
	@Override
	public String execute() throws Exception {
		HttpServletRequest request = ServletActionContext.getRequest();
		HttpSession session = request.getSession();
	//	ActionContext.getContext().
		session.invalidate();
		return SUCCESS;
	}

/*	public String exitAdmin() throws Exception {
		HttpServletRequest request = ServletActionContext.getRequest();
		HttpSession session = request.getSession();
	//	ActionContext.getContext().
		session.invalidate();
		return SUCCESS;
	}*/
}
